package com.twelve.all.utils;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.twelve.all.R;

/**
 * author: 张龙臣
 * date: 2019-08-14.
 */

public class LoginErrorDialog extends Dialog implements View.OnClickListener {
    private Context context;
    private setOnclickDialogListener setOnclickDialogListener;

    public LoginErrorDialog(Context context) {
        super(context, R.style.login_dialog);
        this.context = context;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.dialog_login_error);
        TextView tv_ok = (TextView) findViewById(R.id.tv_ok);
        tv_ok.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        setOnclickDialogListener.onDialogClick();
    }

    public interface setOnclickDialogListener{
        void onDialogClick();
    }

    public void setDialogListener(setOnclickDialogListener setOnclickDialogListener){
        this.setOnclickDialogListener = setOnclickDialogListener;
    }
}
